local DState = Class{
_name = "DrawState",
init = function (self )

end
}


lume.extend(DState, {
	    think_circle = {
	       radius = 1,
	       x = 0,
	       y = 0,
	       color = { r = 1, g = 1, b = 1, a = 1 },
	       draw = function (self )
local color = self.color
		     love.graphics.setColor(color.r, color.g, color.b, color.a)
		     love.graphics.circle('fill', self.x, self.y, self.radius)
end
	    },
	    
	    start = function (self , unit)
self.unit = unit
		  self.think_circle.x = self.unit.x
		  self.think_circle.y = self.unit.y
end,

	    update = function (self , dt)
return
end,

	    draw = function (self )
local unit = self.unit
		  unit.utype.symbol:draw(unit.x, unit.y)
		  if unit:is_hovered() or unit.selected then
		     love.graphics.print(unit.name, unit.x-4, unit.y-8, 0, .3, .3)
		  end

		  if unit.selected then
		     --unit._path_handler:draw()
		     love.graphics.setColor(0.26666666666667, 0.4, 0.6, 1)
love.graphics.rectangle('line', unit.x, unit.y, 8, 8)
love.graphics.setColor(1, 1, 1, 1)
		     love.graphics.print(unit:get_velocity_length(), unit.x, unit.y-2, nil, .2)
		  end
end,

	    show_think = function (self )
if self.draw_think then return end
		  self.draw_think = true
		  self.unit.timer:tween(1, self.think_circle.color, { a = 1 },
					'linear', function () self.draw_think = nil end)
end,

	})

return DState
